import adminIndex from "@/views/admin/user/index"
import userIndex from "@/views/front/user/index"
import admPage from '@/views/admin/adminPage/index'
import uIndex from '@/views/front/uIndex/index'
//路由表
export default [{
        path: '/admin',
        name: 'admin',
        component: adminIndex,
        children: [{
                path: 'login',
                name: 'adminLogin',
                component: resolve => require(["@/views/admin/user/login"], resolve)
            },
            {
                path: 'register',
                name: 'adminRegister',
                component: resolve => require(["@/views/admin/user/register"], resolve)
            }
        ]
    },
    {
        path: '/user',
        name: 'user',
        component: userIndex,
        children: [{
                path: 'login',
                name: 'userLogin',
                component: resolve => require(["@/views/front/user/login"], resolve)
            },
            {
                path: 'register',
                name: 'userRegister',
                component: resolve => require(["@/views/front/user/register"], resolve)
            },
            {
                path: 'findpassword',
                name: 'userFindpassword',
                component: resolve => require(["@/views/front/user/findpassword"], resolve)
            }
        ]
    },
    {
        path: '/admPage',
        name: 'admPage',
        component: admPage,
        children: [{
                path: '/',
                component: resolve => require(["@/views/admin/adminPage/indexPage"], resolve),
            }, {
                path: 'index',
                name: 'admPageIndex',
                component: resolve => require(["@/views/admin/adminPage/indexPage"], resolve),
                meta: { title: '管理员-首页', icon: 'fa fa-desktop', label: '首页', show: true, clickAble: true }
            },
            {
                path: 'userManage',
                name: 'userManage',
                component: resolve => require(["@/views/admin/adminPage/userManage/"], resolve),
                meta: { title: '用户管理', icon: 'fa fa-users', label: '用户管理', show: true, clickAble: false },
            },
            {
                path: 'mateManage',
                name: 'mateManage',
                component: resolve => require(["@/views/admin/adminPage/mateManage"], resolve),
                meta: { title: '素材管理', icon: 'fa fa-archive tab-icon', label: '素材管理', show: true, clickAble: false }
            },
            {
                path: 'publishedManage',
                name: 'publishedManage',
                component: resolve => require(["@/views/admin/adminPage/publishedManage"], resolve),
                meta: { title: '已发布管理', icon: 'fa fa-gitlab tab-icon', label: '已发布管理', show: true, clickAble: false }
            },
            {
                path: 'msgManage',
                name: 'msgManage',
                component: resolve => require(["@/views/admin/adminPage/msgManage"], resolve),
                meta: { title: '聊天管理', icon: 'fa fa-comments tab-icon', label: '聊天管理', show: true, clickAble: false }
            },
            {
                path: 'setting',
                name: 'setting',
                component: resolve => require(["@/views/admin/adminPage/setting"], resolve),
                meta: { title: '设置', icon: 'fa fa-cog', label: '设置', show: true, clickAble: false }
            },
        ]
    },
    {
        path: '/uIndex',
        name: 'uIndex',
        component: uIndex,
        children: [{
                path: '/',
                component: resolve => require(["@/views/front/uIndex/main"], resolve),
                meta: { keepAlive: true }
            },
            {
                path: 'main',
                name: 'uIndexMain',
                component: resolve => require(["@/views/front/uIndex/main"], resolve),
                meta: { keepAlive: true }
            },
            {
                path: 'userCenter',
                name: 'uIndexUserCenter',
                component: resolve => require(["@/views/front/uIndex/userCenter"], resolve),
            },
            {
                path: 'expertCenter',
                name: 'uIndexExpertCenter',
                component: resolve => require(["@/views/front/uIndex/expertCenter/"], resolve),
                children: [{
                        path: '/',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/expertHome"], resolve),
                    },
                    {
                        path: 'originMateManage',
                        name: 'expertOriginMateManage',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/originMateManage"], resolve),
                    },
                    {
                        path: 'published',
                        name: 'expertPublished',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/published"], resolve),
                    },
                    {
                        path: 'privateMessage',
                        name: 'expertPrivateMessage',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/privateMessage"], resolve),
                    }
                ]
            },
            {
                path: 'generalCenter',
                name: 'uIndexGeneralCenter',
                component: resolve => require(["@/views/front/uIndex/generalCenter"], resolve),
                children: [{
                        path: '/',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/expertHome"], resolve),
                    },
                    {
                        path: 'privateMessage',
                        name: 'generalPrivateMessage',
                        component: resolve => require(["@/views/front/uIndex/expertCenter/privateMessage"], resolve),
                    }
                ]
            },
            {
                path: "tag",
                name: "uIndexTag",
                component: resolve => require(["@/views/front/uIndex/tag"], resolve)
            },
            {
                path: "userMsg",
                name: "uIndexUserMsg",
                component: resolve => require(["@/views/front/uIndex/userMsg"], resolve)
            }
        ]
    },
    {
        path: '/publish',
        name: 'publish',
        component: resolve => require(["@/utils/publish/"], resolve),
    }
]